-- GENERATED SPELL FOR [Crystal Wyrm] --


function spell0_31393(pUnit, Event) --@Frost Breath,n/a--
pUnit:FullCastSpellOnTarget(47425,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31393', 10500, 1)
end

function spell1_31393(pUnit, Event) --@Frost Cleave,n/a--
pUnit:FullCastSpellOnTarget(51857,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31393', 8316, 1)
end

function Sorts_31393(pUnit, Event)
local choix_sorts_31393 = math.random(0, 1)
if choix_sorts_31393 == 0 then
pUnit:RegisterEvent('spell0_31393', 1, 1)
end
if choix_sorts_31393 == 1 then
pUnit:RegisterEvent('spell1_31393', 1, 1)
end
end

function mob31393_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31393', math.random(1500, 3000), 1)
end

function mob31393_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31393_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31393_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31393, 1, 'mob31393_Action')
RegisterUnitEvent(31393, 2, 'mob31393_Leave')
RegisterUnitEvent(31393, 3, 'mob31393_Kill')
RegisterUnitEvent(31393, 4, 'mob31393_Die')
